From 9252b88c23eb2359948f301c288fb004afe4f8c5 Mon Sep 17 00:00:00 2001 From: Corey Berla Date: Mon, 28 Nov 2022 16:32:52 -0800 Subject: [PATCH] atspicontext: Cache empty atspi bus address We are caching the bus address as data on the display object when it exists, but fail to set the data when the bus address doesn't exist. That causing excessive calls to GetAddress when the accesssbility bus doesn't exist. Make sure to cache a non-existent accessibility bus by setting the "" string. --- gtk/a11y/gtkatspicontext.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index 4981ef269a..9840e731b4 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -1732,6 +1732,12 @@ get_bus_address (GdkDisplay *display) #endif out: + + if (bus_address == NULL) + g_object_set_data_full (G_OBJECT (display), "-gtk-atspi-bus-address", + g_strdup (""), + g_free); + return bus_address; } -- 2.30.2